// --------地址相关-----------------------
import fetch from '../config/fetch'

/**
 * 获取所有国家
 */
export const getCountry = () => fetch({
  url: '/address/v1/country',
  method: "get",
  data: {},
});

/**
 * 获取某一个城市下的街道
 */
export const getDistrict = (cityId) => fetch({
  url: '/address/v1/' + cityId + '/district',
  method: "get",
  data: {},
});

/**
 * 获取某个国家的所有省份
 */
export const getProvince = (countryId) => fetch({
  url: '/address/v1/' + countryId + '/province',
  method: "get",
  data: {},
});

/**
 * 获取某个省份的所有城市
 */
export const getCity = (provinceId) => fetch({
  url: '/address/v1/' + provinceId + '/city',
  method: "get",
  data: {},
});
